<!--
 * @Author: Hunter
 * @Date: 2022-02-23 18:38:43
 * @LastEditTime: 2022-03-01 14:09:43
 * @LastEditors: Hunter
 * @Description: 
 * @FilePath: \book-mark-client\src\components\menu-list\index.vue
 * 可以输入预定的版权声明、个性签名、空行等
-->
<template>
  <div class="">
    <template v-for="item in bookmarks" :key="item.id">
      <el-sub-menu v-if="item.title" :index="item.id">
        <template #title>{{ item.title }}</template>
        <MenuList
          v-if="item.title"
          :title="item.title"
          :bookmarks="item.children"
          :setInfo="setInfo"
        ></MenuList>
      </el-sub-menu>
      <el-menu-item
        class="el-menu-item"
        v-else
        :index="item.id"
        @click="setInfo(item)"
        ><span>{{ item.name }}</span></el-menu-item
      >
    </template>
  </div>
</template>
<script lang="ts">
export default {
  name: "MenuList",
  props: ["bookmarks", "title", "setInfo"],
  data() {
    return {};
  },
};
</script>



<style>

</style>